package com.yungu.swift.constants;

/**
 * Copyright © 厦门云谷互联信息有限公司 2018-2020 All Right Reserved
 * <p>
 * 订单相关常量管理
 *
 * @author Zerrion
 * @since 2018-07-03 17:10
 */
public class OrderConstant {

    /**
     * 订单关闭状态(0：正常 1：关闭)
     */
    public final static int ORDER_CLOSE_STATUS_NORMAL = 0;
    public final static int ORDER_CLOSE_STATUS_CLOSED = 1;

    /**
     * 跨城拼车：线路起终点类型（1：区域 2：固定点）
     */
    public final static int POINT_SITE_TYPE_AREA = 1;
    public final static int POINT_SITE_TYPE_POINT = 2;


    /**
     * 跨城拼车业务状态：100初始化提交（待支付）200预约中（已支付）300预约成功（待安排）
     * 400已安排（待出发）410司机出发（等待接驾）420司机到达上车地点（待上车）430乘客已上车
     * 500行程开始 510确认费用 520待司机支付 530待乘客支付 540 部分未支付 600行程结束（已完成）700 已评价
     */
    public final static int ORDER_JOIN_STATUS_INIT = 100;
    public final static int ORDER_JOIN_STATUS_SUBING = 200;
    public final static int ORDER_JOIN_STATUS_SUB_OK = 300;
    public final static int ORDER_JOIN_STATUS_WAIT_START = 400;
    public final static int ORDER_JOIN_STATUS_DRIVER_DEPARTURE = 410;
    public final static int ORDER_JOIN_STATUS_ARRIVE_POINT = 420;
    public final static int ORDER_JOIN_STATUS_PASSENGER_ABOARD = 430;
    public final static int ORDER_JOIN_STATUS_STARTED = 500;
    public final static int ORDER_JOIN_STATUS_CONFIRM_FARE = 510;
    public final static int ORDER_JOIN_STATUS_DRIVER_PAY = 520;
    public final static int ORDER_JOIN_STATUS_PASSENGER_PAY = 530;
    public final static int ORDER_JOIN_STATUS_PART_NO_PAY = 540;
    public final static int ORDER_JOIN_STATUS_COMPLETED = 600;
    public final static int ORDER_JOIN_STATUS_COMMENTED = 700;

    /**
     * 订单开票类型：1：按照行程开票 2：按照充值开票
     */
    public final static int BILLING_BY_ROUTE = 1;
    public final static int BILLING_BY_CHARGE = 2;

    /**
     * 订单开票状态：发票状态(0待开票、1待寄出、2已寄出、3已取消、4已作废)
     */
    public final static int ORDER_IS_BILLED_UNGENERATE = 0;
    public final static int ORDER_IS_BILLED_WAIT_SEND = 1;
    public final static int ORDER_IS_BILLED_SENDED = 2;
    public final static int ORDER_IS_BILLED_CANCEL = 3;
    public final static int ORDER_IS_BILLED_DISCARD = 4;

    /**
     * 订单：是否允许指派其他司机（1：允许指派 2：不允许指派）
     */
    public final static int ORDER_ALLOW_ASSIGNED_ENABLED = 1;
    public final static int ORDER_ALLOW_ASSIGNED_DISABLED = 2;

    /**
     * 订单：是否打表来接（1：不打表来接 2：打表来接）
     */
    public final static int ORDER_METERED_FASEL = 1;
    public final static int ORDER_METERED_TRUE = 2;

    /**
     * 来源 1 APP移动端   2 微信公众号  3 电话叫车  4 H5网站  5 后台下单  6 小程序下单  7 扫码下单 8外部订单
     **/
    public final static int ORDER_SOURCE_APP = 1;
    public final static int ORDER_SOURCE_WX = 2;
    public final static int ORDER_SOURCE_PHONE = 3;
    public final static int ORDER_SOURCE_PC = 4;
    public final static int ORDER_SOURCE_ADMIN = 5;
    public final static int ORDER_SOURCE_APPLET = 6;
    public final static int ORDER_SOURCE_SCAN_CODE = 7;
    public final static int ORDER_SOURCE_EXTERNAL = 8;
    /**
     * 订单类型（个人/企业） 个人订单-1 企业用车订单-2
     **/
    public final static Integer ORDER_TYPE_ENT_PER = 1;
    public final static Integer ORDER_TYPE_ENT_COMP = 2;

    /**
     * 订单类型（本人/代客） 本人订单-1 代客订单-2
     **/
    public final static Integer ORDER_TYPE_SELF_ME = 1;
    public final static Integer ORDER_TYPE_SELF_OTHER = 2;


    /**
     * 订单类型（主/子订单） 主订单-1 子订单-2
     **/
    public final static Integer ORDER_TYPE_MAIN = 1;
    public final static Integer ORDER_TYPE_CHILD = 2;

    /**
     * 订单支付目的 支付车费-1 充值账户-2
     **/
    public static final int PAY_PURPOSE_CHARGE_FARE = 1;
    public static final int PAY_PURPOSE_RECHARGE_ACCOUNT = 2;

    /**
     * 订单交互类型 推单-1  抢单-2
     **/
    public final static int NEW_ORDER_TYPE_INTERACTIVE_PUSH = 1;
    public final static int NEW_ORDER_TYPE_INTERACTIVE_SNATCH = 2;

    /**
     * 订单支付类型
     * <p>
     * 第三方用户支付 -0 支付宝支付 -1 微信支付-2 余额-4 现金支付-3 优惠券抵扣-5 信用卡-6 苹果-7 系统变更（后台调整、增加-8 系统变更（后台调整、减少）-9 零元支付-10  企业内部支付-11
     **/
    public final static int PAY_TYPE_THIRD_PARTY = 0;
    public final static int PAY_TYPE_TENPAY = 1;
    public final static int PAY_TYPE_ALIPAY = 2;
    public final static int PAY_TYPE_CASH = 3;
    public final static int PAY_TYPE_BALANCE = 4;
    public final static int PAY_TYPE_COUPON = 5;
    public final static int PAY_TYPE_CREDITCARD = 6;
    public final static int PAY_TYPE_APPLEPAY = 7;
    public final static int PAY_TYPE_SYS_ADD = 8;
    public final static int PAY_TYPE_SYS_REDUCE = 9;
    public final static int PAY_TYPE_ZERO = 10;
    public final static int PAY_TYPE_COMPANY_INNER = 11;

    /**
     * 预支付方式 - 企业支付-1 个人支付-2
     **/
    public final static Integer PREPAY_TYPE_ENT = 1;
    public final static Integer PREPAY_TYPE_OWN = 2;


    //订单小状态
    // 1：新建订单
    /**
     * 订单状态 - 100：［新行程］乘客发单、等待应答
     **/
    public final static Integer ORDER_STATUS_WAIT = 100;
    /**
     * 订单状态 - 101：［新行程］司机发单、拼车中
     **/
    public final static Integer ORDER_STATUS_DRIVER_WAIT = 101;


    // 2：订单进行中
    /**
     * 订单状态 - 200：［行程确定］司机接单、行程确定
     **/
    public final static Integer ORDER_STATUS_CONFIRM = 200;
    /**
     * 订单状态 - 201：［行程确定］司机拼车中（不满员）
     **/
    public final static Integer ORDER_STATUS_POOLING_WAIT = 201;
    /**
     * 订单状态 - 202：［行程确定］司机拼车完成（满员）
     **/
    public final static Integer ORDER_STATUS_POOLING_FULL = 202;
    /**
     * 订单状态 - 210：［去接乘客］司机出发、去接乘客
     **/
    public final static Integer ORDER_STATUS_GO = 210;
    /**
     * 订单状态 - 220：［等待乘客］司机到达、等待乘客
     **/
    public final static Integer ORDER_STATUS_ARRIVE = 220;
    /**
     * 订单状态 - 300：［行程开始］乘客上车、行程开始
     **/
    public final static Integer ORDER_STATUS_START = 300;
    /**
     * 订单状态 - 400：［行程结束］司机送达目的地
     **/
    public final static Integer ORDER_STATUS_ARRIVED = 400;


    // 3：行程结束、待支付
    /**
     * 订单状态 - 500：司机确认费用，等待乘客支付
     **/
    public final static Integer ORDER_STATUS_FARE_CONFIRM = 500;
    /**
     * 订单状态 - 511：［行程确定］乘客取消，待支付取消费用
     **/
    public final static Integer ORDER_STATUS_PAY_CONFIRM_PASS_CANCEL = 511;
    /**
     * 订单状态 - 521：［行程确定］司机取消，待支付取消费用
     **/
    public final static Integer ORDER_STATUS_PAY_CONFIRM_DRI_CANCEL = 521;
    /**
     * 订单状态 - 512：［去接乘客］乘客取消，待支付取消费用
     **/
    public final static Integer ORDER_STATUS_PAY_GO_PASS_CANCEL = 512;
    /**
     * 订单状态 - 522：［去接乘客］司机取消，待支付取消费用
     **/
    public final static Integer ORDER_STATUS_PAY_GO_DRI_CANCEL = 522;
    /**
     * 订单状态 - 513：［等待乘客］乘客取消，待支付取消费用
     **/
    public final static Integer ORDER_STATUS_PAY_WAIT_PASS_CANCEL = 513;
    /**
     * 订单状态 - 523：［等待乘客］司机取消，待支付取消费用
     **/
    public final static Integer ORDER_STATUS_PAY_WAIT_DRI_CANCEL = 523;


    // 4：支付完成、订单结束
    /**
     * 订单状态 - 600：付款完成、行程结束
     **/
    public final static Integer ORDER_STATUS_COMPLETE = 600;
    /**
     * 订单状态 - 610：乘客完成对车主评价
     **/
    public final static Integer ORDER_STATUS_COMMENTED = 610;


    // 5：订单取消
    /**
     * 订单状态 - 900：［新行程］乘客取消
     **/
    public final static Integer ORDER_STATUS_PASSENGER_CANCEL = 900;
    /**
     * 订单状态 - 901：乘客取消（行程确定后、司机未到达）
     **/
    public final static Integer ORDER_STATUS_PASSENGER_CANCEL_CONFIRMED = 901;
    /**
     * 订单状态 - 902：乘客取消（行程确定后、司机到达）
     **/
    public final static Integer ORDER_STATUS_PASSENGER_CANCEL_ARRIVED = 902;
    /**
     * 订单状态 - 910：［新行程］司机取消
     **/
    public final static Integer ORDER_STATUS_DRIVER_CANCEL = 910;

    /**
     * 订单状态 - 90200：［无费用］［行程确定］乘客取消订单
     **/
    public final static Integer ORDER_STATUS_PASS_CANCEL_CONFIRM_FREE = 90200;
    /**
     * 订单状态 - 90210：［无费用］［去接乘客］乘客取消订单
     **/
    public final static Integer ORDER_STATUS_PASS_CANCEL_GO_FREE = 90210;
    /**
     * 订单状态 - 90220：［无费用］［等待乘客］乘客取消订单
     **/
    public final static Integer ORDER_STATUS_PASS_CANCEL_WAIT_FREE = 90220;
    /**
     * 订单状态 - 90511：［有费用］［行程确定］乘客取消订单
     **/
    public final static Integer ORDER_STATUS_PASS_CANCEL_CONFIRM_PAY = 90511;
    /**
     * 订单状态 - 90512：［有费用］［去接乘客］乘客取消订单
     **/
    public final static Integer ORDER_STATUS_PASS_CANCEL_GO_PAY = 90512;
    /**
     * 订单状态 - 90513：［有费用］［等待乘客］乘客取消订单
     **/
    public final static Integer ORDER_STATUS_PASS_CANCEL_WAIT_PAY = 90513;
    /**
     * 订单状态 - 91200：［无费用］［行程确定］司机取消订单
     **/
    public final static Integer ORDER_STATUS_DRI_CANCEL_CONFIRM_FREE = 91200;
    /**
     * 订单状态 - 91210：［无费用］［去接乘客］司机取消订单
     **/
    public final static Integer ORDER_STATUS_DRI_CANCEL_GO_FREE = 91210;
    /**
     * 订单状态 - 91220：［无费用］［等待乘客］司机取消订单
     **/
    public final static Integer ORDER_STATUS_DRI_CANCEL_WAIT_FREE = 91220;
    /**
     * 订单状态 - 91521：［有费用］［行程确定］司机取消订单
     **/
    public final static Integer ORDER_STATUS_DRI_CANCEL_CONFIRM_PAY = 91521;
    /**
     * 订单状态 - 91522：［有费用］［去接乘客］司机取消订单
     **/
    public final static Integer ORDER_STATUS_DRI_CANCEL_GO_PAY = 91522;
    /**
     * 订单状态 - 91523：［有费用］［等待乘客］司机取消订单
     **/
    public final static Integer ORDER_STATUS_DRI_CANCEL_WAIT_PAY = 91523;


    /**
     * 订单状态 - 980：无人抢单，订单超时
     **/
    public final static Integer ORDER_STATUS_NO_ANSWER = 980;
    /**
     * 订单状态 - 990：客服关闭订单
     **/
    public final static Integer ORDER_STATUS_CLOSE = 990;


    //订单大状态
    /**
     * 订单状态 - 1：新建订单
     **/
    public final static Integer ORDER_MAIN_STATUS_INITIAL = 1;
    /**
     * 订单状态 - 2：订单进行中
     **/
    public final static Integer ORDER_MAIN_STATUS_DOING = 2;
    /**
     * 订单状态 - 3：行程结束、待支付
     **/
    public final static Integer ORDER_MAIN_STATUS_DONE = 3;
    /**
     * 订单状态 - 4：支付完成、订单结束
     **/
    public final static Integer ORDER_MAIN_STATUS_PAYED = 4;
    /**
     * 订单状态 - 5：订单取消（完结）
     **/
    public final static Integer ORDER_MAIN_STATUS_CANCEL = 5;

    /**
     * 跨城订单激活状态 0 未激活 1 已激活
     **/
    public final static Integer ORDER_ACTIVATE_STATUS_OFF = 0;
    public final static Integer ORDER_ACTIVATE_STATUS_ON = 1;


    /**
     * 付费模式  1先付费 2后付费
     **/
    public final static Integer ORDER_PAY_PATTERN_FRONT = 1;
    public final static Integer ORDER_PAY_PATTERN_AFTER = 2;

    /**
     * 支付状态 0待支付 1已支付 3退款中 4已退款
     **/
    public final static Integer ORDER_PAY_STATUS_WAIT_PAY = 0;
    public final static Integer ORDER_PAY_STATUS_ALREADY_PAID = 1;
    public final static Integer ORDER_PAY_STATUS_WAIT_REFUND = 2;
    public final static Integer ORDER_PAY_STATUS_ALREADY_REFUND = 3;
}
